<include file="Home@Public/mobile_head"/>	
<link href="{:ADDON_PUBLIC_PATH}/card.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">
<body>
  <div class="container">
            <div class="signin_top">
                    <span class="signin_left">
                      <span class="signin_col"> {$user.score}</span><br/>         
                      可用积分
                    </span>
                    <a class="signintop_mid" onClick="doShare()">
                             分享
                    </a>
                    <span class="signintop_right" style=" visibility:hidden">
                    可用积分
                    </span>         
            </div>
 
           <div class="i_nav">
                    <a href="{:U('score_exchange')}">
                               <img src="{:ADDON_PUBLIC_PATH}/gift_white.png" width="26">
                               <br>
                               兑换礼品
                    </a>
                    <span class="i_line"></span>
                    <a href="{:U('score_method')}">
                                 <img src="{:ADDON_PUBLIC_PATH}/score_method.png" width="26">
                                 <br>
                                 积分攻略
                    </a>
           </div> 
           <!--
   			<div class="h_item_container">
            	<a class="h_item" href="{:U('day_recommend')}"><img style="vertical-align: -5px;" width="24" src="{:ADDON_PUBLIC_PATH}/star.png"/> 每日推荐<em></em></a>
            </div>
           -->
       
        
        
        <nav class="bottom_nav">
            <a class="icon_me_gray" href="{:addons_url('Card://Wap/me')}">我的</a>
            <a class="icon_card_gray" href="{:addons_url('Card://Wap/index')}">会员卡</a>
            <a class="icon_notice_gray" href="{:addons_url('Card://Wap/notice')}">最新通知
             <notempty name='notice_num'>
             <span class="red_circle">{$notice_num}</span>
             </notempty>
             <em></em>
            </a>
            <!--<a class="icon_ticket_gray" href="{:addons_url('Card://coupons/show')}">优惠券</a>-->
            <a class="icon_share_blue cur" href="{:addons_url('Card://Wap/share')}">分享</a>
            <a class="icon_signin_gray" href="{:addons_url('Card://Wap/signin')}">签到</a>
        </nav>
        <div class="bottom_nav_blank"></div>
  </div>
<script type="text/javascript">
function doShare(){
	$.WeiPHP.showShareTips();
}
wx.ready(function(){
	var shareData = {
			title: '会员卡', // 分享标题
			desc: '{$config.title}', // 分享描述
			link: "{:U( 'index',array('token'=>get_token()))}", //分享的链接地址
			imgUrl: "{:SITE_URL}/Addons/Card/View/Public/cover_pic.png", // 分享图标
			type: 'link', // 分享类型,music、video或link，不填默认为link
			dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
			success: function () { 
				// 用户确认分享后执行的回调函数
				$('.shareTips').remove();
				//分享送积分
				//add_credit();
				$.post("{:U('do_share')}",function(d){
					if(d!=0){
						window.location.reload();
					}
					
				});
			},
			cancel: function () { 
				// 用户取消分享后执行的回调函数
				$('.shareTips').remove();
			}
	}
	wx.onMenuShareAppMessage(shareData);
	wx.onMenuShareTimeline(shareData);
	wx.onMenuShareQQ(shareData);
	wx.onMenuShareWeibo(shareData);
});
</script>
</body>
</html>
